
SET(DIR_FFMPEG ${PROJECT_SOURCE_DIR}/third_party/ffmpeg)

if (CMAKE_HOST_WIN32)
	
	if(CMAKE_SIZEOF_VOID_P EQUAL 8)
		SET(DIR_FFMPEG ${THIRD_PARTY}/ffmpeg/x64)
	endif()
	
	SET(DIR_FFMPEG_LIB ${DIR_FFMPEG}/bin)
	SET(LIB_FFMPEG avutil avcodec avformat swresample swscale avfilter)
else()
	SET(DIR_FFMPEG_LIB ${DIR_FFMPEG}/lib ${DIR_FFMPEG}/bin)
	SET(LIB_FFMPEG avfilter-6 avformat-57 avcodec-57 swresample-2 swscale-4 avutil-55 )
	
	#if ("aarch64" STREQUAL "${CMAKE_SYSTEM_PROCESSOR}")
	#	SET(DIR_FFMPEG_LIB ${THIRD_PARTY}/ffmpeg/arm ${DIR_FFMPEG}/lib ${DIR_FFMPEG}/bin)
	#endif()
	
	if (CMAKE_C_COMPILER MATCHES "hisiv300")
		SET(DIR_FFMPEG_LIB ${DIR_FFMPEG}/hisiv300)
	endif()
	
	if (CMAKE_C_COMPILER MATCHES "hisiv400")
		SET(DIR_FFMPEG_LIB ${DIR_FFMPEG}/hisiv400)
	endif()

	if (CMAKE_C_COMPILER MATCHES "hisiv500")
        SET(DIR_FFMPEG_LIB ${DIR_FFMPEG}/hisiv500)
	endif()

	if (CMAKE_C_COMPILER MATCHES "himix200")
		SET(DIR_FFMPEG_LIB ${DIR_FFMPEG}/himix200)
		SET(LIB_FFMPEG avfilter-6 avformat-57 avcodec-57 swresample-2 swscale-4 avutil-55 postproc-54)
	endif()
	
	if (CMAKE_C_COMPILER MATCHES "himix100")
		SET(DIR_FFMPEG_LIB ${DIR_FFMPEG}/aarch64_himix100)
		SET(LIB_FFMPEG avfilter-6 avformat-57 avcodec-57 swresample-2 swscale-4 avutil-55 postproc-54)
	endif()

endif()
